gtktextview: Set magnifier popover on top
authorCarlos Garnacho <carlosg@gnome.org>
Fri, 20 Mar 2020 11:23:03 +0000 (12:23 +0100)
committerCarlos Garnacho <carlosg@gnome.org>
Fri, 20 Mar 2020 14:52:19 +0000 (15:52 +0100)
At the bottom, it sometimes has to fight for the same position than
text handles, besides might not be ergonomically convenient (eg.
finger/hand partly covering the popover). Move it at the top to fix
both.

gtk/gtktextview.c

index 827b0c2b454e29ac10542a72f3731a446e705229..426d34880f447c1eb2813e77df82a4fdb6a77584 100644 (file)
@@ -1884,6 +1884,7 @@ _gtk_text_view_ensure_magnifier (GtkTextView *text_view)
   priv->magnifier = _gtk_magnifier_new (GTK_WIDGET (text_view));
   _gtk_magnifier_set_magnification (GTK_MAGNIFIER (priv->magnifier), 2.0);
   priv->magnifier_popover = gtk_popover_new ();
+  gtk_popover_set_position (GTK_POPOVER (priv->magnifier_popover), GTK_POS_TOP);
   gtk_widget_set_parent (priv->magnifier_popover, GTK_WIDGET (text_view));
   gtk_widget_add_css_class (priv->magnifier_popover, "magnifier");
   gtk_popover_set_autohide (GTK_POPOVER (priv->magnifier_popover), FALSE);